Integrand size = 39, antiderivative size = 125 \[ \int (a+a \cos (c+d x)) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {a (3 A+4 (B+C)) \text {arctanh}(\sin (c+d x))}{8 d}-\frac {a (A+B-3 (A+B+C)) \tan (c+d x)}{3 d}+\frac {a (3 A+4 (B+C)) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a (A+B) \sec ^2(c+d x) \tan (c+d x)}{3 d}+\frac {a A \sec ^3(c+d x) \tan (c+d x)}{4 d} \]
[Out]
Time = 0.30 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {3110, 3100, 2827, 3853, 3855, 3852, 8} \[ \int (a+a \cos (c+d x)) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {a (3 A+4 (B+C)) \text {arctanh}(\sin (c+d x))}{8 d}-\frac {a (-3 (A+B+C)+A+B) \tan (c+d x)}{3 d}+\frac {a (3 A+4 (B+C)) \tan (c+d x) \sec (c+d x)}{8 d}+\frac {a (A+B) \tan (c+d x) \sec ^2(c+d x)}{3 d}+\frac {a A \tan (c+d x) \sec ^3(c+d x)}{4 d} \]
[In]
[Out]
Rule 8
Rule 2827
Rule 3100
Rule 3110
Rule 3852
Rule 3853
Rule 3855
Rubi steps \begin{align*} \text {integral}& = \frac {a A \sec ^3(c+d x) \tan (c+d x)}{4 d}-\frac {1}{4} \int \left (-4 a (A+B)-a (3 A+4 (B+C)) \cos (c+d x)-4 a C \cos ^2(c+d x)\right ) \sec ^4(c+d x) \, dx \\ & = \frac {a (A+B) \sec ^2(c+d x) \tan (c+d x)}{3 d}+\frac {a A \sec ^3(c+d x) \tan (c+d x)}{4 d}-\frac {1}{12} \int (-3 a (3 A+4 (B+C))+4 a (A+B-3 (A+B+C)) \cos (c+d x)) \sec ^3(c+d x) \, dx \\ & = \frac {a (A+B) \sec ^2(c+d x) \tan (c+d x)}{3 d}+\frac {a A \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {1}{4} (a (3 A+4 (B+C))) \int \sec ^3(c+d x) \, dx-\frac {1}{3} (a (A+B-3 (A+B+C))) \int \sec ^2(c+d x) \, dx \\ & = \frac {a (3 A+4 (B+C)) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a (A+B) \sec ^2(c+d x) \tan (c+d x)}{3 d}+\frac {a A \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {1}{8} (a (3 A+4 (B+C))) \int \sec (c+d x) \, dx+\frac {(a (A+B-3 (A+B+C))) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{3 d} \\ & = \frac {a (3 A+4 (B+C)) \text {arctanh}(\sin (c+d x))}{8 d}-\frac {a (A+B-3 (A+B+C)) \tan (c+d x)}{3 d}+\frac {a (3 A+4 (B+C)) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a (A+B) \sec ^2(c+d x) \tan (c+d x)}{3 d}+\frac {a A \sec ^3(c+d x) \tan (c+d x)}{4 d} \\ \end{align*}
Time = 0.61 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.67 \[ \int (a+a \cos (c+d x)) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {a \left (3 (3 A+4 (B+C)) \text {arctanh}(\sin (c+d x))+\tan (c+d x) \left (3 (3 A+4 (B+C)) \sec (c+d x)+6 A \sec ^3(c+d x)+8 \left (3 (A+B+C)+(A+B) \tan ^2(c+d x)\right )\right )\right )}{24 d} \]
[In]
[Out]
Time = 9.64 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.09
method | result | size |
parts | \(\frac {a A \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}-\frac {\left (a A +B a \right ) \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {\left (B a +a C \right ) \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}+\frac {a C \tan \left (d x +c \right )}{d}\) | \(136\) |
derivativedivides | \(\frac {-a A \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+B a \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+a C \tan \left (d x +c \right )+a A \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-B a \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+a C \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(174\) |
default | \(\frac {-a A \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+B a \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+a C \tan \left (d x +c \right )+a A \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-B a \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+a C \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(174\) |
parallelrisch | \(\frac {11 \left (-\frac {6 \left (A +\frac {4 B}{3}+\frac {4 C}{3}\right ) \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{11}+\frac {6 \left (A +\frac {4 B}{3}+\frac {4 C}{3}\right ) \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{11}+\frac {8 \left (\frac {4 B}{3}+C +\frac {4 A}{3}\right ) \sin \left (2 d x +2 c \right )}{11}+\frac {\left (3 A +4 B +4 C \right ) \sin \left (3 d x +3 c \right )}{11}+\frac {4 \left (\frac {2 B}{3}+\frac {2 A}{3}+C \right ) \sin \left (4 d x +4 c \right )}{11}+\sin \left (d x +c \right ) \left (\frac {4 C}{11}+\frac {4 B}{11}+A \right )\right ) a}{4 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) | \(194\) |
norman | \(\frac {\frac {a \left (7 A -4 B -4 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {a \left (3 A +4 B +4 C \right ) \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {a \left (11 A -4 B +12 C \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}+\frac {a \left (13 A +12 B +12 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {a \left (43 A +28 B +12 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}+\frac {a \left (73 A -20 B -84 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {a \left (89 A -4 B +60 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {a \left (3 A +4 B +4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {a \left (3 A +4 B +4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(276\) |
risch | \(-\frac {i a \left (9 A \,{\mathrm e}^{7 i \left (d x +c \right )}+12 B \,{\mathrm e}^{7 i \left (d x +c \right )}+12 C \,{\mathrm e}^{7 i \left (d x +c \right )}-24 C \,{\mathrm e}^{6 i \left (d x +c \right )}+33 A \,{\mathrm e}^{5 i \left (d x +c \right )}+12 B \,{\mathrm e}^{5 i \left (d x +c \right )}+12 C \,{\mathrm e}^{5 i \left (d x +c \right )}-48 A \,{\mathrm e}^{4 i \left (d x +c \right )}-48 B \,{\mathrm e}^{4 i \left (d x +c \right )}-72 C \,{\mathrm e}^{4 i \left (d x +c \right )}-33 A \,{\mathrm e}^{3 i \left (d x +c \right )}-12 B \,{\mathrm e}^{3 i \left (d x +c \right )}-12 C \,{\mathrm e}^{3 i \left (d x +c \right )}-64 A \,{\mathrm e}^{2 i \left (d x +c \right )}-64 B \,{\mathrm e}^{2 i \left (d x +c \right )}-72 C \,{\mathrm e}^{2 i \left (d x +c \right )}-9 A \,{\mathrm e}^{i \left (d x +c \right )}-12 B \,{\mathrm e}^{i \left (d x +c \right )}-12 C \,{\mathrm e}^{i \left (d x +c \right )}-16 A -16 B -24 C \right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {3 a A \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}+\frac {B a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{2 d}-\frac {3 a A \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}-\frac {B a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{2 d}\) | \(380\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.14 \[ \int (a+a \cos (c+d x)) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {3 \, {\left (3 \, A + 4 \, B + 4 \, C\right )} a \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (3 \, A + 4 \, B + 4 \, C\right )} a \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (8 \, {\left (2 \, A + 2 \, B + 3 \, C\right )} a \cos \left (d x + c\right )^{3} + 3 \, {\left (3 \, A + 4 \, B + 4 \, C\right )} a \cos \left (d x + c\right )^{2} + 8 \, {\left (A + B\right )} a \cos \left (d x + c\right ) + 6 \, A a\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \]
[In]
[Out]
Timed out. \[ \int (a+a \cos (c+d x)) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\text {Timed out} \]
[In]
[Out]
none
Time = 0.20 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.74 \[ \int (a+a \cos (c+d x)) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A a + 16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B a - 3 \, A a {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 12 \, B a {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 12 \, C a {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 48 \, C a \tan \left (d x + c\right )}{48 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 254 vs. \(2 (118) = 236\).
Time = 0.36 (sec) , antiderivative size = 254, normalized size of antiderivative = 2.03 \[ \int (a+a \cos (c+d x)) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {3 \, {\left (3 \, A a + 4 \, B a + 4 \, C a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, {\left (3 \, A a + 4 \, B a + 4 \, C a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (9 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 12 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 12 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 49 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 28 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 60 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 31 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 52 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 84 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 39 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 36 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 36 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4}}}{24 \, d} \]
[In]
[Out]
Time = 5.48 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.69 \[ \int (a+a \cos (c+d x)) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {\left (-\frac {3\,A\,a}{4}-B\,a-C\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {49\,A\,a}{12}+\frac {7\,B\,a}{3}+5\,C\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-\frac {31\,A\,a}{12}-\frac {13\,B\,a}{3}-7\,C\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (\frac {13\,A\,a}{4}+3\,B\,a+3\,C\,a\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {a\,\mathrm {atanh}\left (\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (3\,A+4\,B+4\,C\right )}{2\,\left (\frac {3\,A\,a}{2}+2\,B\,a+2\,C\,a\right )}\right )\,\left (3\,A+4\,B+4\,C\right )}{4\,d} \]
[In]
[Out]